package convertor

import (
	commonTools "algo-sdk-go/common/tools"
	"algo-sdk-go/project/matchmaking/adapter/po"
	"algo-sdk-go/project/matchmaking/domain/models/entity"
)

func ConvertRecommendUserPo(recommendUser entity.RecommendUser) po.RecommendUser {
	var (
		timeNew = commonTools.TimeNowStr()
	)

	recommendUserPo := po.RecommendUser{
		Id:                  recommendUser.Id,
		RecommendUserIdList: recommendUser.RecommendUserIdList,
		RecommendDate:       recommendUser.RecommendDate,
		Status:              "",
		IsDeleted:           false,
		CreateUser:          "",
		CreateTime:          timeNew,
		ModifyUser:          "",
		UpdateTime:          timeNew,
	}

	return recommendUserPo
}

func ConvertRecommendUserEntity(recommendUser po.RecommendUser) entity.RecommendUser {
	var (
		recommendUserEntity = entity.RecommendUser{
			Id:                  recommendUser.Id,
			RecommendUserIdList: recommendUser.RecommendUserIdList,
			RecommendDate:       recommendUser.RecommendDate,
		}
	)

	return recommendUserEntity
}
